<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>用户编辑</title>
<js href="__PUBLIC__/js/jquery-2.0.2.js" />
<js href="__PUBLIC__/ueditor/ueditor.config.js" />    
<js href="__PUBLIC__/ueditor/ueditor.all.min.js" />
<script>
$(function(){
    var ue = UE.getEditor('questioncontent',{
        serverUrl :'{:U("Admin/Comment/ueditor")}'
    });

    ue.addListener("ready", function () {
        // editor准备好之后才可以使用
        ue.setContent('<?php echo $res[0]["content"]  ?>');
    });
})
</script>
<script type="text/javascript" src="__PUBLIC__/timeVendor/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/timeVendor/js/hDate.js"></script>
<link href="__PUBLIC__/timeVendor/hDate.css" rel="stylesheet" />
</head>
<body>
<div class="pd-20">
  <form action="{:U('admin/comment/editsave')}" method="post" class="form form-horizontal"  enctype="multipart/form-data">

    <div class="row cl">
      <input type="hidden" value="<?php echo $res[0]['id'] ?>" name="id">
      <label class="form-label col-3"><span class="c-red">*</span>提问者：</label>
      <div class="formControls col-5">
        <span><?php echo $res[0]['username'] ?></span>
      </div>
      <div class="col-4"></div>
    </div>

    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>标题：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" name="title" value="<?php echo $res[0]['title'] ?>" placeholder="问题标题">
      </div>
      <div class="col-4"></div>
    </div>
  

    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>问题状态：</label>
      <div class="formControls col-5 skin-minimal">
        <div class="radio-box">
          <input type="radio"  name="status" value="0" <?php if($res[0]['status']==0) echo 'checked'; ?> >
          <label for="status-1">启用</label>
        </div>
        <div class="radio-box">
          <input type="radio"  name="status" value="-1" <?php if($res[0]['status']== -1  ) echo 'checked';?>>
          <label for="status-2">停用</label>
        </div>
      </div>
      <div class="col-4"></div>
    </div>

    <!-- 问题内容 -->
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>问题内容：</label>
      <div class="formControls col-5">
        <div id="questioncontent" ></div>
        
      </div>
      <div class="col-4"> </div>
    </div>
    
    <!-- 提问时间 -->
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>提问时间：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text ui_timepicker"  placeholder="提问时间"  id="user-tel" name="create_time" value="<?php echo date("Y-m-d H:i:s",$res[0]['create_time']) ?>" id="Text1" onClick="calendar.show({ id: this })"  >
      </div>
      <div class="col-4"> </div>
    </div>
    
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>浏览量：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="浏览量"  name="view"  value="<?php echo $res[0]['view'] ?>">
        <input type="hidden" value="<?php echo $res[0]['uid'] ?>" name="uid">
      </div>
      <div class="col-4"> </div>
    </div>
    
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>回答量：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="浏览量"  name="answer_num"  value="<?php echo $res[0]['answer_num'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>

    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>投票量：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="投票量"  name="vote_num"  value="<?php echo $res[0]['vote_num'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>
    
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>关注量：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="浏览量"  name="focus_num"  value="<?php echo $res[0]['focus_num'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>

    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>收藏量：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text"  placeholder="收藏量"  name="fav_num"  value="<?php echo $res[0]['fav_num'] ?>">
      </div>
      <div class="col-4"> </div>
    </div>

    <div class="row cl">
      <div class="col-9" style="margin-left:20%">
         <table class="table table-border table-bordered table-bg" style="width:62%">
            <tr>
              <th style="text-align:center;width:60px;">分类：</th>
              <td>
                <table class="table table-border table-bordered table-bg">
                  <tbody>
                    <tr>
                      <td class="permission-list">
                        <div style="marigin-right:2px;marigin-left:5px;display:inline-block;">
                          <?php 
                            foreach ($res[0]['cate'] as $key => $value) {
                              ?>
                                <label class="item" ><input name="cid[]" 
                                  <?php 
                                      if(in_array($value['id'], $CurrentCateRes)) echo 'checked';
                                   ?>
                                type="checkbox" value="<?php echo $value['id'] ?>"><?php echo $value['cname'] ?></label>
                              <?php
                            }
                           ?>
                        </div>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
        </table>
      </div>
    </div>

    <div class="row cl">
      <div class="col-9 col-offset-3">
        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
      </div>
    </div>
  </form>
</div>
</div>
<script type="text/javascript" src="__PUBLIC__/lib/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/Validform_v5.3.2.js"></script> 
<script type="text/javascript" src="__PUBLIC__/js/H-ui.js"></script> 
<script type="text/javascript" src="__PUBLIC__/js/H-ui.admin.js"></script> 
<script type="text/javascript">
$(function(){
	$("#form-user-add").Validform({
		tiptype:2,
	});
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
});
</script> 
<script>

$('.themouseon').mouseover(function(event) {
  var userid = $(this).attr('userid');
  var hideimg = $('#hideimg');
  var url = '__ROOT__';
  $.ajax({
    url: '{:U("admin/user/ajaxuserface")}',
    type: 'POST',
    dataType: 'json',
    data: {theid: userid},
    success:function(data){
      hideimg.css('display', 'block');
      hideimg.attr('src', url + '/' +data.img);
    },
  });
});
$('.themouseon').mouseout(function(event) {
    $('#hideimg').css('display', 'none');
    // hideimg.attr('src', url + '/' +data.img);
});
</script>
</body>
</html>